package info.nixbear.tgcms.domain;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.Version;
import javax.jdo.annotations.VersionStrategy;

@PersistenceCapable(identityType=IdentityType.APPLICATION, detachable="true")
@Version( 
		strategy=VersionStrategy.VERSION_NUMBER, 
		column = "version", 
		extensions={@Extension(vendorName="datanucleus", key="field-name", 
				value="version")}
)
@FetchGroup(name = "all", members = { @Persistent(name = "attributes"),
		@Persistent(name = "attachments"), @Persistent(name = "template"), @Persistent(name = "website") })
public class Attachment extends Page {
	
    @Persistent
    String fileName;

    @Persistent
    String fileKey;
    
    @Persistent
    String servingUrl;
    
    public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileKey() {
		return fileKey;
	}

	public void setFileKey(String fileKey) {
		this.fileKey = fileKey;
	}

	public String getServingUrl() {
		return servingUrl;
	}

	public void setServingUrl(String servingUrl) {
		this.servingUrl = servingUrl;
	}

}
